package de.nordakademie.wpk.share.core.data.datastorage.depot;

import java.util.ArrayList;
import java.util.List;

import de.nordakademie.wpk.share.core.data.Depot;
import de.nordakademie.wpk.share.core.data.treeitem.TreeItem;
import de.nordakademie.wpk.share.core.service.ShareService;

/**
 * Provides a list of all supported indices
 * 
 * @author Christian Baumhof
 */
public class SupportedIndices {

	private static final String[] daxSymbols = new String[] { "ads.de",
			"alv.de", "bas.de", "bayn.de", "bei.de", "bmw.de", "cbk.de",
			"dai.de", "dbk.de", "63du.de", "lha.de", "dpw.de", "dte.de",
			"eoan.de", "fre.de", "fme.de", "hei.de", "hen3.de", "ifx.de",
			"sdf.de", "lin.de", "man.de", "mrk.de", "meo.de", "muv2.de",
			"rwe.de", "sap.de", "sie.de", "tka.de", "vow3.de" };

	public static List<Depot> getSupportedIndices() {
		List<Depot> indices = new ArrayList<Depot>();

		indices.add(initIndexDAX());

		return indices;
	}

	private static Depot initIndexDAX() {
		Depot dax = new Depot(0, "DAX", "Deutscher Aktienindex",
				TreeItem.Type.INDEX);

		for (String symbol : daxSymbols) {
			dax.addShare(ShareService.shareContainer.getShareBySymbol(symbol));
		}

		return dax;
	}
}
